//
//  HTStatusRetweetView.swift
//  WeiBoDemo
//
//  Created by 郝涛 on 16/4/21.
//  Copyright © 2016年 郝涛. All rights reserved.
//

import UIKit

class HTStatusRetweetView: UIView {
    
    var status:HTStatus?{
        didSet{
            
            
            contentLabel.text = status?.retweeted_status?.text
        }
        
    }
    
  override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    //设置视图
    func setupUI(){
        //添加
        addSubview(contentLabel)
        //添加约束
        contentLabel.snp_makeConstraints { (make) -> Void in
            make.leading.top.equalTo(self).offset(10)
            make.width.equalTo(SCREENW - 20)
            
        }
        self.snp_makeConstraints { (make) -> Void in
            make.bottom.equalTo(contentLabel.snp_bottom).offset(10)
        }
        contentLabel.text = "retweeted_statusretweeted_statusretweeted_statusretweeted_statusretweeted_statusretweeted_status"
    }
    //懒加载控件
    //转发微博正文
    private lazy var contentLabel: UILabel = {
        let lab = UILabel()

        lab.textColor = UIColor.blackColor()
        
        lab.font = UIFont.systemFontOfSize(16)
        
        lab.numberOfLines = 0
        return lab
        }()
}
